import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hygf/page/home/customer_detail/design_msg/logic.dart';

import '../../../../bean/CustomerList.dart';
import '../../../../res/HDColors.dart';
import '../../../../view/FieldEditor.dart';
import '../../../../view/image_picker_widget.dart';
import 'logic.dart';

class CheckAcceptPage extends StatelessWidget {
  CheckAcceptPage({Key? key}) : super(key: key);

  final logic = Get.put(CheckAcceptLogic());
  final state = Get.find<CheckAcceptLogic>().state;

  @override
  Widget build(BuildContext context) {
    return GetBuilder<CheckAcceptLogic>(builder: (logic) {
      return pageWidget();
    });
  }

  pageWidget() {
    return SingleChildScrollView(
      child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
        FieldEditor(
          label: '备注',
          contentTextAlign: TextAlign.end,
          initialValue: state.acceptance.remarks,
          showLine: false,
          isRequired: false,
          readOnly: true,
        ),
        Container(
          margin: const EdgeInsets.fromLTRB(13, 10, 20, 0),
          child: Text('报告文件',
              style: TextStyle(color: HDColors.black, fontSize: 16)),
        ),
        Container(
          margin: const EdgeInsets.fromLTRB(13, 10, 20, 0),
          child: ImagePickerWidget(
            controller: state.reportFileController,
            readonly: true,
          ),
        ),
        Container(
          margin: const EdgeInsets.fromLTRB(13, 10, 20, 0),
          child:
              Text('其他', style: TextStyle(color: HDColors.black, fontSize: 16)),
        ),
        Container(
          margin: const EdgeInsets.fromLTRB(13, 10, 20, 0),
          child: ImagePickerWidget(
            controller: state.otherController,
            readonly: true,
          ),
        )
      ]),
    );
  }
}
